private subroutine SearchEllipsoidByCode(ell, code)
Search for ellipsoid parameters using a code.
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
type(Ellipsoid),
|
intent(out) |
|
|
:: |
ell |
|
integer,
|
intent(in) |
|
|
:: |
code |
|
Variables
Type |
Visibility | Attributes |
|
Name |
| Initial | |
logical,
|
public |
|
:: |
found |
|
|
|
integer(kind=short),
|
public |
|
:: |
i |
|
|
|
Source Code
SUBROUTINE SearchEllipsoidByCode &
!
(ell, code)
USE StringManipulation, ONLY: &
!Imported routines:
ToString
IMPLICIT NONE
! Arguments with intent(in):
INTEGER, INTENT(IN) :: code
! Arguments with intent(out):
TYPE (Ellipsoid), INTENT(OUT) :: ell
! Local variables:
INTEGER (KIND = short) :: i
LOGICAL :: found
!------------end of declaration------------------------------------------------
found = .FALSE.
DO i = 1, SIZE (ellps)
IF (ellps (i) % code == code ) THEN
ell = ellps (i)
found = .TRUE.
END IF
END DO
IF ( .NOT. found ) THEN
CALL Catch ('error', 'GeoLib', &
'ellipsoid code not found: ', &
argument = ToString (code) )
END IF
END SUBROUTINE SearchEllipsoidByCode